package com.healthy.education.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.healthy.education.mapper.UserCommentsMapper;
import com.healthy.education.domain.UserComments;
import com.healthy.education.service.IUserCommentsService;

/**
 * 文章评论Service业务层处理
 * 
 * @author 束伟
 * @date 2024-03-29
 */
@Service
public class UserCommentsServiceImpl implements IUserCommentsService 
{
    @Autowired
    private UserCommentsMapper userCommentsMapper;

    /**
     * 查询文章评论
     * 
     * @param id 文章评论主键
     * @return 文章评论
     */
    @Override
    public UserComments selectUserCommentsById(Long id)
    {
        return userCommentsMapper.selectUserCommentsById(id);
    }

    /**
     * 查询文章评论列表
     * 
     * @param userComments 文章评论
     * @return 文章评论
     */
    @Override
    public List<UserComments> selectUserCommentsList(UserComments userComments)
    {
        return userCommentsMapper.selectUserCommentsList(userComments);
    }

    /**
     * 新增文章评论
     * 
     * @param userComments 文章评论
     * @return 结果
     */
    @Override
    public int insertUserComments(UserComments userComments)
    {
        return userCommentsMapper.insertUserComments(userComments);
    }

    /**
     * 修改文章评论
     * 
     * @param userComments 文章评论
     * @return 结果
     */
    @Override
    public int updateUserComments(UserComments userComments)
    {
        return userCommentsMapper.updateUserComments(userComments);
    }

    /**
     * 批量删除文章评论
     * 
     * @param ids 需要删除的文章评论主键
     * @return 结果
     */
    @Override
    public int deleteUserCommentsByIds(Long[] ids)
    {
        return userCommentsMapper.deleteUserCommentsByIds(ids);
    }

    /**
     * 删除文章评论信息
     * 
     * @param id 文章评论主键
     * @return 结果
     */
    @Override
    public int deleteUserCommentsById(Long id)
    {
        return userCommentsMapper.deleteUserCommentsById(id);
    }
}
